package xyf.p11.other.bit;

/**
 * ClassName: P0231_IsPowerOf2
 * Description:
 * Author: xyf
 * Date: 9/9/22 10:02 AM
 * Version: 1.0
 **/
public class P0231_IsPowerOf2
{
    public boolean isPowerOfTwo(int n)
    {
        return n > 0 && (n & (n - 1)) == 0;
    }
}
